package com.dingdang.feign;

import com.dingdang.data.Result;
import com.dingdang.feign.callback.ReserveFeignCallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@FeignClient(value = "dingdangcar-reserve-service",fallback = ReserveFeignCallBack.class)
public interface OrderFeign {

    //订单查询
    @GetMapping("/order/selectOrder")
    @ResponseBody
    public Result selectInfo(HttpServletRequest request);

    //订单退款
    @GetMapping("/order/refund")
    @ResponseBody
    public String refund(@RequestParam String orderId,
                         @RequestParam String tradeNo,
                         @RequestParam String price,
                         @RequestParam(defaultValue = "无")String cause);
}
